package com.example.compose

import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.hapticfeedback.HapticFeedbackType
import androidx.compose.ui.platform.LocalHapticFeedback
import androidx.compose.ui.tooling.preview.Preview

@Preview
@Composable
private fun HapticPreview() {
    val current = LocalHapticFeedback.current
    Button(onClick = { current.performHapticFeedback(HapticFeedbackType.LongPress) }) {
        Text(text = "按钮")
    }
}